/**
 * 生成指定长度的随机字母数字组合的邀请码
 * @param length 邀请码长度
 * @returns 生成的随机邀请码
 */
export function generateRandomCode(length: number): string {
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
  let result = '';
  for (let i = 0; i < length; i++) {
    result += chars.charAt(Math.floor(Math.random() * chars.length));
  }
  return result;
}
